{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<div class="t-n-s-top">
    <div class="tables-searchbox">
        <form method="post">
            <div class="mgt10">
                <span class="tbs-txt">添加时间：</span>
                <input type="text" autocomplete="off" class="Wdate" name="start_date" value="{$start_date|date_format:'%Y-%m-%d'}"  onclick="WdatePicker()">
                <span class="tbs-txt">至</span>
                <input type="text" autocomplete="off" class="Wdate" name="end_date" value="{$end_date|date_format:'%Y-%m-%d'}"  onclick="WdatePicker()">
                <input type="hidden" name="act" value="search">
                <button type="submit" class="btn"><i class="gicon-search"></i>搜索</button>
            </div>

        </form>
    </div>

    <div class="t-month-chart" id="container">
    </div>
</div>
{/block}

{block name="js"}
<script type="text/javascript" src="/Public/Plugins/Highcharts/highcharts.js?version={$version}"></script>
<script src="/Public/Plugins/My97DatePicker/WdatePicker.js?version={$version}"></script>

<script>
    var sum_area =0;
    var sum_station = 0;
    {foreach from=$contract_list item = item}
        sum_area =  parseInt({$item.sum_area});
        sum_station=  parseInt({$item.sum_station});
    {/foreach}


</script>


{literal}
<script type="text/javascript">
    $(function () {
        $('#container').highcharts({
            chart: {
                type: 'column'
            },
            title: {
                text: '每月成交的面积和工位'
            },
            xAxis: {
                categories:['工位数量','成交面积']
            },
            yAxis: [{
                min: 0,
                title: {
                    text: '数量'
                }
            }, {
                title: {
                    text: '面积'
                },
                opposite: true
            }],
            legend: {
                shadow: false
            },
            tooltip: {
                shared: false
            },
            plotOptions: {
                column: {
                    grouping: false,
                    shadow: false,
                    borderWidth: 0
                }
            },
            series: [{
                name: '数量',
                color: 'rgba(165,170,217,1)',
                data: [sum_station,0],
                pointPadding: 0.4,
                pointPlacement: 0
            },{
                name: '面积',
                color: 'rgba(248,161,63,1)',
                data: [0, sum_area],
                tooltip: {
                    valuePrefix: '',
                    valueSuffix: ''
                },
                pointPadding: 0.4,
                pointPlacement: 0,
                yAxis: 1
            }]
        });
    });

</script>
{/literal}
{/block}

{block name="css"}
<link rel="stylesheet" href="/Public/Css/acp/AcpOrder/order_num_stat.css" type="text/css" />
{/block} 
